<template>
  <div id="app">
    <img src="./assets/logo.png">
    <span>{{ countProxy() }}</span>
    <p>{{ count }}</p>
  </div>
</template>

<script>
import { mapState, mapMutations } from 'vuex'
export default {
  name: 'app',
  methods: {
    ...mapMutations(['increment']),
    countProxy () {
      return this.count
    }
  },
  computed: {
    ...mapState(['count'])
  },
  data () {
    return {}
  },
  mounted () {
    setInterval(() => {
      this.increment()
    }, 500)
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
